package com.cx.caigou.baojia.mapper;

import com.cx.caigou.baojia.model.*;
import com.cx.caigou.request.model.SpareClass;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BaoJiaMapper {


    List<BaoJiaClass> queryData(BaoJiaSelect baoJiaSelect);

    int queryCount(BaoJiaSelect baoJiaSelect);

    List<SupplierClass> queryByLegalPerson(Integer legalPersonId);

    @Select("select count(quotationNumber) from quotation where quotationNumber = #{ri}")
    int queryIsFind(int ri);

    @Insert("insert into quotation(quotationNumber,totalQuantityQuoted," +
            "currencyCode,createTime,startTime,endTime" +
            ",biddingType,exchangeRate,isTax,legalPersonName) values" +
            "(#{quotationNumber},#{totalQuantityQuoted}," +
            "#{currencyCode},#{createTime},#{startTime},#{endTime}," +
            "#{biddingType},#{exchangeRate},#{isTax},#{legalPersonName})")
    void addQuotation(BaoJiaAdd baoJiaAdd);

    @Delete("delete from quotationdetails where quotationNumber = #{quotationNumber}")
    void deleteDetails(Integer quotationNumber);


    void addDetaeils(Integer quotationNumber, List<SeeVo> quotationItem);

    List<QuptationReturnVo> querySearchData(SearvhVo searvhVo);

    int querySearchCount(SearvhVo searvhVo);

    
    List<BaoJiaSee> see(Integer quotationNumber);

    List<SeeVo> see1(Integer quotationNumber);
}
